package com.rgp.apidriver.feign;

import com.rgp.internalcommon.dto.DriverUserDto;
import com.rgp.internalcommon.dto.PointsDto;
import com.rgp.internalcommon.dto.ResponseResult;
import com.rgp.internalcommon.response.DriverVerificationResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author nhp
 * @version 1.0
 * @description TODO
 * @date 2024-04-16 17:55
 */
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    @PostMapping("/users")
    public ResponseResult addDriver(@RequestBody DriverUserDto driverUserDto);

    @PutMapping("/users")
    public ResponseResult updateDriver(@RequestBody DriverUserDto driverUserDto);

    @GetMapping("/users/{phoneNum}")
    public ResponseResult<DriverVerificationResponse> getDriverByPhoneNum(@PathVariable("phoneNum") String phondNum);

    @PostMapping("/upload/points")
    public ResponseResult uploadPoints(@RequestBody PointsDto pointsDto);
}